﻿using HarmonyLib;
using Verse;

[HarmonyPatch(typeof(Pawn_AgeTracker), "AgeTick")]
public static class Pawn_AgeTracker_AgeTick_Patch
{
    private static bool Prefix(Pawn_AgeTracker __instance, Pawn ___pawn)
    {
        //Pawn pawn = Traverse.Create(__instance).Field("pawn").GetValue<Pawn>();

        var hediff = ___pawn.health.hediffSet.GetFirstHediff<HediffForever>();
        if (hediff != null)
        {
            return false;
        }
        return true;
    }
}